﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DBA.Common;
using DBA.Model;
using DBA.Data;
using DBA.Data.ADO;
namespace DBA.Web.PaperManage
{
    public partial class PaperSumShow : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request.Params["id"]))
                {
                    hidID.Value = RequestHelper.QueryString("id");
                    aSelectTeachers.InnerText = Request.Params["name"];
                    ModifyStudentInit();
                }
            }
        }

        private void ModifyStudentInit()
        {
            string id = hidID.Value;
            if (!VerificationHelper.IsNullOrEmpty<string>(id))
            {
                PaperWorkSum model = dal.ModifyData.GetEntity<PaperWorkSum>(id);
                if (!VerificationHelper.IsNullOrEmpty<PaperWorkSum>(model)) //如果学生对象不为空，那么对控件赋值
                {
                    ConvertHelper.ModelToControl<PaperWorkSum>(model, pan_tab.Controls);
                }
            }



        }

        DataAccessLibrary dal = CommonQuery.DataAccessLibrary;

    }
}